import { createWebHistory, createRouter } from 'vue-router'

import Home from '../views/Home.vue'
import About from '../views/About.vue'
import Register from '../views/Register.vue'
import Login from '../views/Login.vue'
import Main from '../views/Main.vue'
import Exam from '../views/Exam.vue'
import Question from '../views/Question.vue'
import My from '../views/My.vue'

export const constantRoutes = [
    { path: '/home', component: Home },
    { path: '/about', component: About },
    { path: '/register', component: Register },
    { path: '/', component: Login },
    { path: '/main', component: Main },
    { path: '/exam', component: Exam },
    { path: '/question', component: Question },
    { path: '/my', component: My },
]

const router = createRouter({
    history: createWebHistory(),
    routes: [...constantRoutes]
})

export default router;